<template>
  <div class="person">
    <h2>当前求和为：{{sum}}</h2>
    <button @click="Add">点我sum+1</button>
    <hr>
    <img  v-for="(dog,index) in dogList" :src="dog" :key="index"  >
    <br>
    <br>
    <button @click="Change">点击换图</button>
  </div>

</template>

<script lang="ts" setup name="Person">
import useDog  from "@/components/Hooks/useDog";
import useSum from "@/components/Hooks/useSum";

const{sum,Add}=useSum()
const {dogList,Change}=useDog()
</script>

<style>
.person {
  background-color: burlywood;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 10px;
  color: black; /* 设置字体颜色为黑色 */
}
img{
  height: 100px;
}
</style>
